<?php

class Light_Db_Table extends Light_Db_Table_Abstract
{
    /**
     * @param int $offset
     * @param int $ipp
     * @return Light_Db_Table_Rowset
     */
	public function paginate($offset, $ipp)
	{
        $select = $this->select($this)
                	   ->limit($ipp, $offset);

	    return $this->fetchAll($select);
    }

    /**
     * @return int
     */
	public function paginateCount()
	{
        $select = $this->select($this)
                	   ->reset('columns')
                	   ->columns('COUNT(*)');

	    return $this->getAdapter()->fetchOne($select);
    }

    /**
     * @param array $data
     * @param Light_Db_Table_Row $item
     * @return array
     */
    public function validate(array &$data, Light_Db_Table_Row $item = null)
    {
        return array();
    }
}
